/*
 * PatternFiltering.h
 *
 *  Created on: 22/lug/2014
 *      Author: raf
 */

#ifndef PATTERNFILTERING_H_
#define PATTERNFILTERING_H_

#define BLACK_LABEL 0
#define RED_LABEL 1
#define GREEN_LABEL 2

#include <opencv2/opencv.hpp>
using namespace cv;

class PatternFiltering {
private:
	int maxConsecBlacks;
	void createLabeledImage(Mat& threshColor1, Mat& threshColor2, Mat& labeledImage );
	void saveResult(Mat& resultGreen, Mat& resultRed, vector<int> sequencesStart, vector<int> sequencesEnd, int column);
public:
	PatternFiltering(int maxConsecBlacks);
	virtual ~PatternFiltering();
	void apply(Mat& threshColor1, Mat& threshColor2, Mat& resultRed,Mat& resultGreen);
};

#endif /* PATTERNFILTERING_H_ */
